3.53 \(\int \frac {(a+b x^2)^2 \sin (c+d x)}{x^2} \, dx\)

Optimal. Leaf size=97 \[ a^2 d \cos (c) \text {Ci}(d x)-a^2 d \sin (c) \text {Si}(d x)-\frac {a^2 \sin (c+d x)}{x}-\frac {2 a b \cos (c+d x)}{d}+\frac {2 b^2 \cos (c+d x)}{d^3}+\frac {2 b^2 x \sin (c+d x)}{d^2}-\frac {b^2 x^2 \cos (c+d x)}{d} \]

[Out]

a^2*d*Ci(d*x)*cos(c)+2*b^2*cos(d*x+c)/d^3-2*a*b*cos(d*x+c)/d-b^2*x^2*cos(d*x+c)/d-a^2*d*Si(d*x)*sin(c)-a^2*sin
(d*x+c)/x+2*b^2*x*sin(d*x+c)/d^2

________________________________________________________________________________________

Rubi [A]  time = 0.16, antiderivative size = 97, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 7, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.368, Rules used = {3339, 2638, 3297, 3303, 3299, 3302, 3296} \[ a^2 d \cos (c) \text {CosIntegral}(d x)-a^2 d \sin (c) \text {Si}(d x)-\frac {a^2 \sin (c+d x)}{x}-\frac {2 a b \cos (c+d x)}{d}+\frac {2 b^2 x \sin (c+d x)}{d^2}+\frac {2 b^2 \cos (c+d x)}{d^3}-\frac {b^2 x^2 \cos (c+d x)}{d} \]

Antiderivative was successfully verified.

[In]

Int[((a + b*x^2)^2*Sin[c + d*x])/x^2,x]

[Out]

(2*b^2*Cos[c + d*x])/d^3 - (2*a*b*Cos[c + d*x])/d - (b^2*x^2*Cos[c + d*x])/d + a^2*d*Cos[c]*CosIntegral[d*x] -
 (a^2*Sin[c + d*x])/x + (2*b^2*x*Sin[c + d*x])/d^2 - a^2*d*Sin[c]*SinIntegral[d*x]

Rule 2638

Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 3296

Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> -Simp[((c + d*x)^m*Cos[e + f*x])/f, x] +
Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 3297

Int[((c_.) + (d_.)*(x_))^(m_)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[((c + d*x)^(m + 1)*Sin[e + f*x])/(d*(
m + 1)), x] - Dist[f/(d*(m + 1)), Int[(c + d*x)^(m + 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && LtQ[
m, -1]

Rule 3299

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[SinIntegral[e + f*x]/d, x] /; FreeQ[{c, d,
 e, f}, x] && EqQ[d*e - c*f, 0]

Rule 3302

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[CosIntegral[e - Pi/2 + f*x]/d, x] /; FreeQ
[{c, d, e, f}, x] && EqQ[d*(e - Pi/2) - c*f, 0]

Rule 3303

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Dist[Cos[(d*e - c*f)/d], Int[Sin[(c*f)/d + f*x]
/(c + d*x), x], x] + Dist[Sin[(d*e - c*f)/d], Int[Cos[(c*f)/d + f*x]/(c + d*x), x], x] /; FreeQ[{c, d, e, f},
x] && NeQ[d*e - c*f, 0]

Rule 3339

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*Sin[(c_.) + (d_.)*(x_)], x_Symbol] :> Int[ExpandIntegran
d[Sin[c + d*x], (e*x)^m*(a + b*x^n)^p, x], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && IGtQ[p, 0]

Rubi steps

\begin {align*} \int \frac {\left (a+b x^2\right )^2 \sin (c+d x)}{x^2} \, dx &=\int \left (2 a b \sin (c+d x)+\frac {a^2 \sin (c+d x)}{x^2}+b^2 x^2 \sin (c+d x)\right ) \, dx\\ &=a^2 \int \frac {\sin (c+d x)}{x^2} \, dx+(2 a b) \int \sin (c+d x) \, dx+b^2 \int x^2 \sin (c+d x) \, dx\\ &=-\frac {2 a b \cos (c+d x)}{d}-\frac {b^2 x^2 \cos (c+d x)}{d}-\frac {a^2 \sin (c+d x)}{x}+\frac {\left (2 b^2\right ) \int x \cos (c+d x) \, dx}{d}+\left (a^2 d\right ) \int \frac {\cos (c+d x)}{x} \, dx\\ &=-\frac {2 a b \cos (c+d x)}{d}-\frac {b^2 x^2 \cos (c+d x)}{d}-\frac {a^2 \sin (c+d x)}{x}+\frac {2 b^2 x \sin (c+d x)}{d^2}-\frac {\left (2 b^2\right ) \int \sin (c+d x) \, dx}{d^2}+\left (a^2 d \cos (c)\right ) \int \frac {\cos (d x)}{x} \, dx-\left (a^2 d \sin (c)\right ) \int \frac {\sin (d x)}{x} \, dx\\ &=\frac {2 b^2 \cos (c+d x)}{d^3}-\frac {2 a b \cos (c+d x)}{d}-\frac {b^2 x^2 \cos (c+d x)}{d}+a^2 d \cos (c) \text {Ci}(d x)-\frac {a^2 \sin (c+d x)}{x}+\frac {2 b^2 x \sin (c+d x)}{d^2}-a^2 d \sin (c) \text {Si}(d x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.28, size = 97, normalized size = 1.00 \[ a^2 d \cos (c) \text {Ci}(d x)-a^2 d \sin (c) \text {Si}(d x)-\frac {a^2 \sin (c+d x)}{x}-\frac {2 a b \cos (c+d x)}{d}+\frac {2 b^2 \cos (c+d x)}{d^3}+\frac {2 b^2 x \sin (c+d x)}{d^2}-\frac {b^2 x^2 \cos (c+d x)}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[((a + b*x^2)^2*Sin[c + d*x])/x^2,x]

[Out]

(2*b^2*Cos[c + d*x])/d^3 - (2*a*b*Cos[c + d*x])/d - (b^2*x^2*Cos[c + d*x])/d + a^2*d*Cos[c]*CosIntegral[d*x] -
 (a^2*Sin[c + d*x])/x + (2*b^2*x*Sin[c + d*x])/d^2 - a^2*d*Sin[c]*SinIntegral[d*x]

________________________________________________________________________________________

fricas [A]  time = 0.82, size = 113, normalized size = 1.16 \[ -\frac {2 \, a^{2} d^{4} x \sin \relax (c) \operatorname {Si}\left (d x\right ) + 2 \, {\left (b^{2} d^{2} x^{3} + 2 \, {\left (a b d^{2} - b^{2}\right )} x\right )} \cos \left (d x + c\right ) - {\left (a^{2} d^{4} x \operatorname {Ci}\left (d x\right ) + a^{2} d^{4} x \operatorname {Ci}\left (-d x\right )\right )} \cos \relax (c) + 2 \, {\left (a^{2} d^{3} - 2 \, b^{2} d x^{2}\right )} \sin \left (d x + c\right )}{2 \, d^{3} x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)^2*sin(d*x+c)/x^2,x, algorithm="fricas")

[Out]

-1/2*(2*a^2*d^4*x*sin(c)*sin_integral(d*x) + 2*(b^2*d^2*x^3 + 2*(a*b*d^2 - b^2)*x)*cos(d*x + c) - (a^2*d^4*x*c
os_integral(d*x) + a^2*d^4*x*cos_integral(-d*x))*cos(c) + 2*(a^2*d^3 - 2*b^2*d*x^2)*sin(d*x + c))/(d^3*x)

________________________________________________________________________________________

giac [C]  time = 0.55, size = 1638, normalized size = 16.89 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)^2*sin(d*x+c)/x^2,x, algorithm="giac")

[Out]

-1/2*(a^2*d^4*x*real_part(cos_integral(d*x))*tan(1/2*d*x + 1/2*c)^2*tan(1/2*d*x)^2*tan(1/2*c)^2 + a^2*d^4*x*re
al_part(cos_integral(-d*x))*tan(1/2*d*x + 1/2*c)^2*tan(1/2*d*x)^2*tan(1/2*c)^2 + 2*a^2*d^4*x*imag_part(cos_int
egral(d*x))*tan(1/2*d*x + 1/2*c)^2*tan(1/2*d*x)^2*tan(1/2*c) - 2*a^2*d^4*x*imag_part(cos_integral(-d*x))*tan(1
/2*d*x + 1/2*c)^2*tan(1/2*d*x)^2*tan(1/2*c) + 4*a^2*d^4*x*sin_integral(d*x)*tan(1/2*d*x + 1/2*c)^2*tan(1/2*d*x
)^2*tan(1/2*c) - 2*b^2*d^2*x^3*tan(1/2*d*x + 1/2*c)^2*tan(1/2*d*x)^2*tan(1/2*c)^2 - a^2*d^4*x*real_part(cos_in
tegral(d*x))*tan(1/2*d*x + 1/2*c)^2*tan(1/2*d*x)^2 - a^2*d^4*x*real_part(cos_integral(-d*x))*tan(1/2*d*x + 1/2
*c)^2*tan(1/2*d*x)^2 + a^2*d^4*x*real_part(cos_integral(d*x))*tan(1/2*d*x + 1/2*c)^2*tan(1/2*c)^2 + a^2*d^4*x*
real_part(cos_integral(-d*x))*tan(1/2*d*x + 1/2*c)^2*tan(1/2*c)^2 + a^2*d^4*x*real_part(cos_integral(d*x))*tan
(1/2*d*x)^2*tan(1/2*c)^2 + a^2*d^4*x*real_part(cos_integral(-d*x))*tan(1/2*d*x)^2*tan(1/2*c)^2 - 2*b^2*d^2*x^3
*tan(1/2*d*x + 1/2*c)^2*tan(1/2*d*x)^2 + 2*a^2*d^4*x*imag_part(cos_integral(d*x))*tan(1/2*d*x + 1/2*c)^2*tan(1
/2*c) - 2*a^2*d^4*x*imag_part(cos_integral(-d*x))*tan(1/2*d*x + 1/2*c)^2*tan(1/2*c) + 4*a^2*d^4*x*sin_integral
(d*x)*tan(1/2*d*x + 1/2*c)^2*tan(1/2*c) + 2*a^2*d^4*x*imag_part(cos_integral(d*x))*tan(1/2*d*x)^2*tan(1/2*c) -
 2*a^2*d^4*x*imag_part(cos_integral(-d*x))*tan(1/2*d*x)^2*tan(1/2*c) + 4*a^2*d^4*x*sin_integral(d*x)*tan(1/2*d
*x)^2*tan(1/2*c) - 2*b^2*d^2*x^3*tan(1/2*d*x + 1/2*c)^2*tan(1/2*c)^2 + 2*b^2*d^2*x^3*tan(1/2*d*x)^2*tan(1/2*c)
^2 - 4*a*b*d^2*x*tan(1/2*d*x + 1/2*c)^2*tan(1/2*d*x)^2*tan(1/2*c)^2 - a^2*d^4*x*real_part(cos_integral(d*x))*t
an(1/2*d*x + 1/2*c)^2 - a^2*d^4*x*real_part(cos_integral(-d*x))*tan(1/2*d*x + 1/2*c)^2 - a^2*d^4*x*real_part(c
os_integral(d*x))*tan(1/2*d*x)^2 - a^2*d^4*x*real_part(cos_integral(-d*x))*tan(1/2*d*x)^2 - 4*a^2*d^3*tan(1/2*
d*x + 1/2*c)^2*tan(1/2*d*x)^2*tan(1/2*c) + a^2*d^4*x*real_part(cos_integral(d*x))*tan(1/2*c)^2 + a^2*d^4*x*rea
l_part(cos_integral(-d*x))*tan(1/2*c)^2 - 4*a^2*d^3*tan(1/2*d*x + 1/2*c)^2*tan(1/2*d*x)*tan(1/2*c)^2 - 8*b^2*d
*x^2*tan(1/2*d*x + 1/2*c)*tan(1/2*d*x)^2*tan(1/2*c)^2 - 2*b^2*d^2*x^3*tan(1/2*d*x + 1/2*c)^2 + 2*b^2*d^2*x^3*t
an(1/2*d*x)^2 - 4*a*b*d^2*x*tan(1/2*d*x + 1/2*c)^2*tan(1/2*d*x)^2 + 2*a^2*d^4*x*imag_part(cos_integral(d*x))*t
an(1/2*c) - 2*a^2*d^4*x*imag_part(cos_integral(-d*x))*tan(1/2*c) + 4*a^2*d^4*x*sin_integral(d*x)*tan(1/2*c) +
2*b^2*d^2*x^3*tan(1/2*c)^2 - 4*a*b*d^2*x*tan(1/2*d*x + 1/2*c)^2*tan(1/2*c)^2 + 4*a*b*d^2*x*tan(1/2*d*x)^2*tan(
1/2*c)^2 + 4*b^2*x*tan(1/2*d*x + 1/2*c)^2*tan(1/2*d*x)^2*tan(1/2*c)^2 - a^2*d^4*x*real_part(cos_integral(d*x))
 - a^2*d^4*x*real_part(cos_integral(-d*x)) + 4*a^2*d^3*tan(1/2*d*x + 1/2*c)^2*tan(1/2*d*x) - 8*b^2*d*x^2*tan(1
/2*d*x + 1/2*c)*tan(1/2*d*x)^2 + 4*a^2*d^3*tan(1/2*d*x + 1/2*c)^2*tan(1/2*c) - 4*a^2*d^3*tan(1/2*d*x)^2*tan(1/
2*c) - 8*b^2*d*x^2*tan(1/2*d*x + 1/2*c)*tan(1/2*c)^2 - 4*a^2*d^3*tan(1/2*d*x)*tan(1/2*c)^2 + 2*b^2*d^2*x^3 - 4
*a*b*d^2*x*tan(1/2*d*x + 1/2*c)^2 + 4*a*b*d^2*x*tan(1/2*d*x)^2 + 4*b^2*x*tan(1/2*d*x + 1/2*c)^2*tan(1/2*d*x)^2
 + 4*a*b*d^2*x*tan(1/2*c)^2 + 4*b^2*x*tan(1/2*d*x + 1/2*c)^2*tan(1/2*c)^2 - 4*b^2*x*tan(1/2*d*x)^2*tan(1/2*c)^
2 - 8*b^2*d*x^2*tan(1/2*d*x + 1/2*c) + 4*a^2*d^3*tan(1/2*d*x) + 4*a^2*d^3*tan(1/2*c) + 4*a*b*d^2*x + 4*b^2*x*t
an(1/2*d*x + 1/2*c)^2 - 4*b^2*x*tan(1/2*d*x)^2 - 4*b^2*x*tan(1/2*c)^2 - 4*b^2*x)/(d^3*x*tan(1/2*d*x + 1/2*c)^2
*tan(1/2*d*x)^2*tan(1/2*c)^2 + d^3*x*tan(1/2*d*x + 1/2*c)^2*tan(1/2*d*x)^2 + d^3*x*tan(1/2*d*x + 1/2*c)^2*tan(
1/2*c)^2 + d^3*x*tan(1/2*d*x)^2*tan(1/2*c)^2 + d^3*x*tan(1/2*d*x + 1/2*c)^2 + d^3*x*tan(1/2*d*x)^2 + d^3*x*tan
(1/2*c)^2 + d^3*x)

________________________________________________________________________________________

maple [A]  time = 0.05, size = 156, normalized size = 1.61 \[ d \left (\frac {\left (3 c^{2}+2 c +1\right ) b^{2} \left (-\left (d x +c \right )^{2} \cos \left (d x +c \right )+2 \cos \left (d x +c \right )+2 \left (d x +c \right ) \sin \left (d x +c \right )\right )}{d^{4}}-\frac {4 b^{2} c \left (1+2 c \right ) \left (\sin \left (d x +c \right )-\left (d x +c \right ) \cos \left (d x +c \right )\right )}{d^{4}}-\frac {2 a b \cos \left (d x +c \right )}{d^{2}}-\frac {6 c^{2} b^{2} \cos \left (d x +c \right )}{d^{4}}+a^{2} \left (-\frac {\sin \left (d x +c \right )}{x d}-\Si \left (d x \right ) \sin \relax (c )+\Ci \left (d x \right ) \cos \relax (c )\right )\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x^2+a)^2*sin(d*x+c)/x^2,x)

[Out]

d*((3*c^2+2*c+1)/d^4*b^2*(-(d*x+c)^2*cos(d*x+c)+2*cos(d*x+c)+2*(d*x+c)*sin(d*x+c))-4*b^2*c*(1+2*c)/d^4*(sin(d*
x+c)-(d*x+c)*cos(d*x+c))-2/d^2*a*b*cos(d*x+c)-6*c^2/d^4*b^2*cos(d*x+c)+a^2*(-sin(d*x+c)/x/d-Si(d*x)*sin(c)+Ci(
d*x)*cos(c)))

________________________________________________________________________________________

maxima [C]  time = 1.68, size = 97, normalized size = 1.00 \[ \frac {{\left (a^{2} {\left (\Gamma \left (-1, i \, d x\right ) + \Gamma \left (-1, -i \, d x\right )\right )} \cos \relax (c) + a^{2} {\left (-i \, \Gamma \left (-1, i \, d x\right ) + i \, \Gamma \left (-1, -i \, d x\right )\right )} \sin \relax (c)\right )} d^{4} + 4 \, b^{2} d x \sin \left (d x + c\right ) - 2 \, {\left (b^{2} d^{2} x^{2} + 2 \, a b d^{2} - 2 \, b^{2}\right )} \cos \left (d x + c\right )}{2 \, d^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)^2*sin(d*x+c)/x^2,x, algorithm="maxima")

[Out]

1/2*((a^2*(gamma(-1, I*d*x) + gamma(-1, -I*d*x))*cos(c) + a^2*(-I*gamma(-1, I*d*x) + I*gamma(-1, -I*d*x))*sin(
c))*d^4 + 4*b^2*d*x*sin(d*x + c) - 2*(b^2*d^2*x^2 + 2*a*b*d^2 - 2*b^2)*cos(d*x + c))/d^3

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {\sin \left (c+d\,x\right )\,{\left (b\,x^2+a\right )}^2}{x^2} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((sin(c + d*x)*(a + b*x^2)^2)/x^2,x)

[Out]

int((sin(c + d*x)*(a + b*x^2)^2)/x^2, x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (a + b x^{2}\right )^{2} \sin {\left (c + d x \right )}}{x^{2}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x**2+a)**2*sin(d*x+c)/x**2,x)

[Out]

Integral((a + b*x**2)**2*sin(c + d*x)/x**2, x)

________________________________________________________________________________________